#!/usr/bin/env python
import euclid

class Circle( object ):
    __slots__ = ['pos', 'radius']
    def __init__(self, pos, radius):
        assert type(pos) in [ euclid.Vector2, euclid.Vector3, euclid.Point2, euclid.Point3 ]
        
        self.pos = pos
        self.radius = radius
        
    def intersects( self, other ):
        if isinstance(other, Circle):
            toOther = other.pos - self.pos
            dist = toOther.magnitude()
            return max(0, (other.radius + self.radius) - dist )